using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using KPIS.GERP.Models.Class;

namespace KPIS.GERP.Models.HRM
{
	[Table("hrm_ps_command_dtls")]
    public class PsCommandDtls
    {
        public PsCommandDtls()
        {

        }

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Column("cmd_dtls_seq"),Display(Name = "CmdDtlsId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public int CmdDtlsId { get; set; }

        [CustomRequired]
        [ForeignKey("HrmPsCommands")]
		[DataMember, Column("cmd_seq"),Display(Name = "CmdId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> CmdId { get; set; }

        [CustomRequired]
        [ForeignKey("HrmPsEmployees")]
		[DataMember, Column("emp_seq"),Display(Name = "EmpId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> EmpId { get; set; }

        [CustomRequired]
		[DataMember, Column("start_date"),Display(Name = "StartDate", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<System.DateTime> StartDate { get; set; }

		[DataMember, Column("end_date"),Display(Name = "EndDate", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<System.DateTime> EndDate { get; set; }

		[ForeignKey("EduHis")]
		[DataMember, Column("edu_his_seq"),Display(Name = "EduHisId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> EduHisId { get; set; }

        [DataType(DataType.MultilineText)]
		[DataMember, Column("remarks"),Display(Name = "Remarks", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string Remarks { get; set; }

        [DataType(DataType.MultilineText)]
		[DataMember, Column("rpt_remarks"),Display(Name = "RptRemarks", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string RptRemarks { get; set; }

        //old====================================================================================


		[ForeignKey("Move")]
		[DataMember, Column("move_seq"),Display(Name = "MoveId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> MoveId { get; set; }

		[ForeignKey("OldPos")]
		[DataMember, Column("old_pos_seq"),Display(Name = "OldPosId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> OldPosId { get; set; }

		[DataMember, Column("old_pos_ref"),Display(Name = "OldPosRef", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldPosRef { get; set; }

		[DataMember, Column("old_pos_name"),Display(Name = "OldPosName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldPosName { get; set; }

		[DataMember, Column("old_exec_pos_name"),Display(Name = "OldExecPosName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldExecPosName { get; set; }

		[ForeignKey("OldClass")]
		[DataMember, Column("old_class_seq"),Display(Name = "OldClassId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> OldClassId { get; set; }

		[ForeignKey("OldJobSite")]
		[DataMember, Column("old_job_site_seq"),Display(Name = "OldJobSiteId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> OldJobSiteId { get; set; }

		[DataMember, Column("old_job_site_name"),Display(Name = "OldJobSiteName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldJobSiteName { get; set; }

		[ForeignKey("OldWorkingJobSite")]
		[DataMember, Column("old_working_job_site_seq"),Display(Name = "OldWorkingJobSiteId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> OldWorkingJobSiteId { get; set; }

		[DataMember, Column("old_working_job_site_name"),Display(Name = "OldWorkingJobSiteName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldWorkingJobSiteName { get; set; }

		[DataMember, Column("old_salary"),Display(Name = "OldSalary", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<double> OldSalary { get; set; }

		[DataMember, Column("old_exec_salary"),Display(Name = "OldExecSalary", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<double> OldExecSalary { get; set; }
        
		[DataMember, Column("old_pos_line"),Display(Name = "OldPosLine", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldPosLine { get; set; }

		[ForeignKey("OldPosType")]
		[DataMember, Column("old_pos_type_seq"),Display(Name = "OldPosTypeId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> OldPosTypeId { get; set; }

		[ForeignKey("OldExecPos")]
		[DataMember, Column("old_exec_pos_seq"),Display(Name = "OldExecPosId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> OldExecPosId { get; set; }

		[ForeignKey("NewPos")]
		[DataMember, Column("new_pos_seq"),Display(Name = "NewPosId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> NewPosId { get; set; }

		[DataMember, Column("new_pos_ref"),Display(Name = "NewPosRef", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewPosRef { get; set; }

		[DataMember, Column("new_pos_name"),Display(Name = "NewPosName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewPosName { get; set; }

		[DataMember, Column("new_exec_pos_name"),Display(Name = "NewExecPosName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewExecPosName { get; set; }

		[ForeignKey("NewClass")]
		[DataMember, Column("new_class_seq"),Display(Name = "NewClassId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> NewClassId { get; set; }

		[ForeignKey("NewJobSite")]
		[DataMember, Column("new_job_site_seq"),Display(Name = "NewJobSiteId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> NewJobSiteId { get; set; }

		[DataMember, Column("new_job_site_name"),Display(Name = "NewJobSiteName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewJobSiteName { get; set; }

		[ForeignKey("NewWorkingJobSite")]
		[DataMember, Column("new_working_job_site_seq"),Display(Name = "NewWorkingJobSiteId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> NewWorkingJobSiteId { get; set; }

		[DataMember, Column("new_working_job_site_name"),Display(Name = "NewWorkingJobSiteName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewWorkingJobSiteName { get; set; }

		[DataMember, Column("new_salary"),Display(Name = "NewSalary", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<double> NewSalary { get; set; }

		[DataMember, Column("new_exec_salary"),Display(Name = "NewExecSalary", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<double> NewExecSalary { get; set; }
        
		[DataMember, Column("new_pos_line"),Display(Name = "NewPosLine", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewPosLine { get; set; }

		[ForeignKey("NewPosType")]
		[DataMember, Column("new_pos_type_seq"),Display(Name = "NewPosTypeId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> NewPosTypeId { get; set; }

		[ForeignKey("NewExecPos")]
		[DataMember, Column("new_exec_pos_seq"),Display(Name = "NewExecPosId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> NewExecPosId { get; set; }

        //transfer==================================================================================

		[DataMember, Column("old_dep_name"),Display(Name = "OldDepName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldDepName { get; set; }

		[DataMember, Column("old_working_dep_name"),Display(Name = "OldWorkingDepName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string OldWorkingDepName { get; set; }

		[DataMember, Column("new_dep_name"),Display(Name = "NewDepName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewDepName { get; set; }

		[DataMember, Column("new_working_dep_name"),Display(Name = "NewWorkingDepName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string NewWorkingDepName { get; set; }

        //salary====================================================================================

		[DataMember, Column("prm_base"),Display(Name = "PrmBase", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<double> PrmBase { get; set; }

		[DataMember, Column("prm_percent"),Display(Name = "PrmPercent", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<decimal> PrmPercent { get; set; }

		[DataMember, Column("prm_amount"),Display(Name = "PrmAmount", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<double> PrmAmount { get; set; }

        //ent=======================================================================================

		[DataMember, Column("remarks2"),Display(Name = "Remarks2", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string Remarks2 { get; set; }

		[DataMember, Column("ent_no"),Display(Name = "EntNo", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> EntNo { get; set; }

		[DataMember, Column("ent_pos_name"),Display(Name = "EntPosName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string EntPosName { get; set; }

		[ForeignKey("EntPosType")]
		[DataMember, Column("ent_pos_type_seq"),Display(Name = "EntPosTypeId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> EntPosTypeId { get; set; }

		[ForeignKey("EntClass")]
		[DataMember, Column("ent_class_seq"),Display(Name = "EntClassId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> EntClassId { get; set; }

		[DataMember, Column("ent_job_site_name"),Display(Name = "EntJobSiteName", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string EntJobSiteName { get; set; }

		[DataMember, Column("ent_date"),Display(Name = "EntDate", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<System.DateTime> EntDate { get; set; }
        
		[DataMember, Column("back_date"),Display(Name = "BackDate", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<System.DateTime> BackDate { get; set; }

		[ForeignKey("TmpEmp")]
		[DataMember, Column("tmp_emp_seq"),Display(Name = "TmpEmpId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> TmpEmpId { get; set; }

		[ForeignKey("TmpEdu")]
		[DataMember, Column("tmp_edu_seq"),Display(Name = "TmpEduId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> TmpEduId { get; set; }

        //etc======================================================================================

		[DataMember, Column("curr_pos_class_date"),Display(Name = "CurrPosClassDate", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<System.DateTime> CurrPosClassDate { get; set; }

		[DataMember, Column("quit_date"),Display(Name = "QuitDate", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<System.DateTime> QuitDate { get; set; }

		[ForeignKey("Currency")]
		[DataMember, Column("currency_seq"),Display(Name = "CurrencyId", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public Nullable<int> CurrencyId { get; set; }

        //=========================================================================================

		[DataMember, Column("record_status"),Display(Name = "RecordStatus", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public string RecordStatus { get; set; }

		[DataMember, Column("created_by"),Display(Name = "CreatedBy", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public int? CreatedBy { get; set; }

		[DataMember, Column("created_when"),Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public DateTime? CreatedWhen { get; set; }

		[DataMember, Column("updated_by"),Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public int? UpdatedBy { get; set; }

		[DataMember, Column("updated_when"),Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public DateTime? UpdatedWhen { get; set; }

        
		[DataMember, Display(Name = "HrmPsCommands", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual HRM.PsCommand HrmPsCommands { get; set; }

		[DataMember, Display(Name = "HrmPsEmployees", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual HRM.Employee HrmPsEmployees { get; set; }


		[DataMember, Display(Name = "HrmMpPositions", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual Position old_HrmMpPositions { get; set; }

		[DataMember, Display(Name = "HrmMpClasses", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual MpClass old_HrmMpClasses { get; set; }

		[DataMember, Display(Name = "HrmMpJobSites", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual HRM.JobSite old_HrmMpJobSites { get; set; }

		[DataMember, Display(Name = "HrmMpJobSites", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual HRM.JobSite old_working_HrmMpJobSites { get; set; }

		[DataMember, Display(Name = "HrmMpExecPositions", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual ExecutivePosition old_HrmMpExecPositions { get; set; }

		[DataMember, Display(Name = "HrmMpPositions", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual Position new_HrmMpPositions { get; set; }

		[DataMember, Display(Name = "HrmMpClasses", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual MpClass new_HrmMpClasses { get; set; }

		[DataMember, Display(Name = "HrmMpJobSites", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual HRM.JobSite new_HrmMpJobSites { get; set; }

		[DataMember, Display(Name = "HrmMpJobSites", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual HRM.JobSite new_working_HrmMpJobSites { get; set; }

		[DataMember, Display(Name = "HrmMpExecPositions", ResourceType = typeof(Resources.PsCommandDtlsResource))]
        public virtual ExecutivePosition new_HrmMpExecPositions { get; set; }

		public virtual PsEduHistory EduHis { get; set; }

		public virtual EsMoveRequest Move { get; set; }

		public virtual Position OldPos { get; set; }

		public virtual MpClass OldClass { get; set; }

		public virtual HRM.JobSite OldJobSite { get; set; }

		public virtual HRM.JobSite OldWorkingJobSite { get; set; }

		public virtual MasPositionType OldPosType { get; set; }

		public virtual ExecutivePosition OldExecPos { get; set; }

		public virtual Position NewPos { get; set; }

		public virtual MpClass NewClass { get; set; }

		public virtual HRM.JobSite NewJobSite { get; set; }

		public virtual HRM.JobSite NewWorkingJobSite { get; set; }

		public virtual MasPositionType NewPosType { get; set; }

		public virtual ExecutivePosition NewExecPos { get; set; }

		public virtual MasPositionType EntPosType { get; set; }

		public virtual MpClass EntClass { get; set; }

		public virtual TmpEmployee TmpEmp { get; set; }

		public virtual TmpEmployeeEducation TmpEdu { get; set; }

		public virtual HRM.MasCurrency Currency { get; set; }

    }
}